
<?php include 'inc/top.php';?>
<?php include 'inc/slideshow.php';?>

	<tr>

		<td style="border-top:1px dotted #999999;">

		<table border="0" width="100%" id="table4">

			<tr>

				<?php include 'inc/main.php';?>

				<?php include 'inc/sidebar_right.php';?>

			</tr>

		</table>

		</td>

	</tr>
    <?php
//			 include 'inc/customer_slide.php';
			 ?>
	<?php include 'inc/footer.php';?>

	<tr>

		<td>&nbsp;</td>

	</tr>

	<tr>

		<td>&nbsp;</td>

	</tr>

</table>

</body>
<!-- DC Parallax Slider CSS -->
<!--<link rel="stylesheet" type="text/css" href="css/tsc_parallax.css" />-->
<!--<link rel="stylesheet" href="jscript/nivo-slider/demo/style.css" type="text/css" media="screen" />-->
<link rel="stylesheet" href="jscript/nivo-slider/themes/default/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="jscript/nivo-slider/themes/light/light.css" type="text/css" media="screen" />
<link rel="stylesheet" href="jscript/nivo-slider/themes/dark/dark.css" type="text/css" media="screen" />
<link rel="stylesheet" href="jscript/nivo-slider/themes/bar/bar.css" type="text/css" media="screen" />
<link rel="stylesheet" href="jscript/nivo-slider/nivo-slider.css" type="text/css" media="screen" />
<link
	rel="stylesheet" href="jscript/jquery-ui-1.11.0_theme.custom/jquery-ui.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="jscript/reveal/reveal.css">
<link rel="stylesheet" href="css/style.css">
<style type="text/css">


#ui-id-8{
	min-height : 400px;
}
//#tabs-1{
//	min-height : 400px;
//}
</style>


<!-- DC Javascript Library -->
<!-- jQuery Library (do not call twice on same page) -->

<!-- DC Parallax Slider JS -->
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> -->
<script type="text/javascript" src="jscript/nivo-slider/jquery.nivo.slider.js"></script> 
<script type="text/javascript" src="jscript/content_hover.js"></script>
<script
	type="text/javascript"
	src="jscript/jquery-ui-1.11.0_theme.custom/jquery-ui.js"></script>

<script type="text/javascript" src="jscript/reveal/jquery.reveal.js"></script>

<script type="text/javascript">
		
        $(window).load(function() {
			//Service
//			 $( "#accordion" )
//			.accordion({
//				header: "> div > h3"
//			})
//			.sortable({
//				axis: "y",
//				handle: "h3",
//				stop: function( event, ui ) {
//				// IE doesn't register the blur when sorting
//				// so trigger focusout handlers to remove .ui-state-focus
//				ui.item.children( "h3" ).triggerHandler( "focusout" );
//				// Refresh accordion to handle new order
//				$( this ).accordion( "refresh" );
//				}
//			});
			 $( "#tabs" ).tabs({
				event: "mouseover"
				});
            //Slider
            $('#slider').nivoSlider({
            });
            
            //Content
            $('.d1').contenthover({
                overlay_background:'#000',
                overlay_opacity:0.8
            });
            $('.d2').contenthover({
                effect:'slide',
                slide_speed:300,
                overlay_background:'#000',
                overlay_opacity:0.8
            });
            $('.d3').contenthover({
                overlay_width:270,
                overlay_height:180,
                effect:'slide',
                slide_direction:'right',
                overlay_x_position:'right',
                overlay_y_position:'center',
                overlay_background:'#000',
                overlay_opacity:0.8
            });
         // Add class for link which be choise
            var path_name = window.location.pathname;
            var path_array = path_name.split("/");
            $("#table31 a").each(function(index,value){
				if($(value).attr("href")==path_array[2]){
					$(value).removeClass("menumain");
					$(value).addClass("menumainselect");
					$(value).parent().addClass("choose");
					
				}else{
					$(value).removeClass("menumain");
					$(value).removeClass("menumainselect");
					$(value).addClass("menumain");
					$(value).parent().removeClass("choose");
				}	
            });
        });

		$('#login').click(function(){

			var username = $('#user_name').val();
			var password = $('#pass_word').val();
			var error = $('.error');
			if (username=='' || password == '') {
				error.html('Your username or password is empty');
			}else{
				
				$.ajax({
					url : 'login.php',
					data : 'username='+username+'&password='+password,
					dataType : 'json',
					method : 'POST',
					success : function(response){
						if (response.status == 200) {
							window.location = 'admin/index.php';
						}else{
							error.html('Your username or password is not correct !');
						}
					}

				});
			}
		});
		$(document).keypress(function(event){
			var keycode = (event.keyCode ? event.keyCode : event.which);
			if(keycode == '13'){
				var username = $('#user_name').val();
				var password = $('#pass_word').val();
				var error = $('.error');
				if (username=='' || password == '') {
					alert('Your username or password is empty, vui lòng click login và nhập các thông tin cần thiết');
				}else{
					$.ajax({
						url : 'login.php',
						data : 'username='+username+'&password='+password,
						dataType : 'json',
						method : 'POST',
						success : function(response){
							if (response.status == 200) {
								window.location = 'admin/index.php';
							}else{
								error.html('Your username or password is not correct !');
							}
						}

					});
				}	
			}
		});
	
</script>
</html>



